<template>
    <div>
        <Head/>
        <div v-if="RefreshPage">
            <OLAxios/>
            <OLTitle/>
            <!-- <test/> -->
            <div v-for="(odata , index) in MyOrderData" :key="index">
                <OLProductTitle :odata="odata"></OLProductTitle>
                <OLProduct :odata="odata"></OLProduct>
            </div>
        </div>
        <OLProgress v-if="!RefreshPage"></OLProgress>
        <Tail/>
    </div>
</template>

<script>
import Head from '../universalpage/head/XiaoHead.vue'
import Tail from '../universalpage/tail/XiaoTail.vue'
import OLTitle from './XiaoOLTitle.vue'
import OLProductTitle from './XiaoOLProductTitle.vue'
import OLProduct from './XiaoOLProduct.vue'
import OLAxios from './XiaoOLAxios.vue'
import test from './test.vue'
import OLProgress from './XiaoOLProgress.vue'
    export default {
        name:'XiaoOrderList',
        components:{
                Head,Tail,
                OLTitle,OLProductTitle,OLProduct,OLAxios,test,OLProgress
            },
        data(){
            return{
                MyOrderData:[[]],
                RefreshPage:1,
            }
        },
        mounted(){
            this.$bus.$on('MyOrderData',(MyOrderData)=>{
                this.MyOrderData=MyOrderData
                console.log(this.MyOrderData,'%%%%%');
            })
            this.$bus.$on('RefreshPage',(RefreshPage)=>{
                this.RefreshPage=RefreshPage
            })
        },
        beforeDestroy(){
            this.$bus.$off('MyOrderData')
            this.$bus.$off('RefreshPage')
        },
        methods:{
            look(){
                console.log(this,'%%%%%%');
            }
        },
    }
</script>

<style scoped>
</style>